lib: use Object.freeze to avoid defensive cloning in SourceMap#62830
Conversation
3b8cc82 to
73ffd8a
Compare
Codecov Reportβ
All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #62830 +/- ##
==========================================
+ Coverage 89.61% 89.65% +0.03%
==========================================
Files 706 706
Lines 219203 219389 +186
Branches 41995 42061 +66
==========================================
+ Hits 196445 196692 +247
+ Misses 14663 14589 -74
- Partials 8095 8108 +13
π New features to boost your workflow:
|
legendecas
left a comment
There was a problem hiding this comment.
Would you mind adding a note on https://github.com/nodejs/node/blob/main/doc/api/module.md#sourcemappayload that the returned payload is frozen? Thanks!
legendecas
left a comment
There was a problem hiding this comment.
Would you mind fixing the linter complaints? Thanks
bd11c1e to
f5cc42f
Compare
f5cc42f to
f493f69
Compare
|
Fix, rebase and make the commit Verified. |
Co-authored-by: Chengzhong Wu <legendecas@gmail.com>
Commit Queue failed- Loading data for nodejs/node/pull/62830 β Done loading data for nodejs/node/pull/62830 ----------------------------------- PR info ------------------------------------ Title lib: use Object.freeze to avoid defensive cloning in SourceMap (#62830) Author Daijiro Wachi <daijiro.wachi@gmail.com> (@watilde) Branch watilde:fixes-memory-sourcemap -> nodejs:main Labels semver-major, author ready, source maps, commit-queue-squash Commits 4 - lib: use Object.freeze to avoid defensive cloning in SourceMap - doc: clarify sourceMap.payload behavior and immutability - doc: add change metadata for validator message - doc: fix unclosed YAML comment in sourceMap.payload Committers 2 - Daijiro Wachi <daijiro.wachi@gmail.com> - GitHub <noreply@github.com> PR-URL: https://github.com/nodejs/node/pull/62830 Reviewed-By: Chengzhong Wu <legendecas@gmail.com> ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/62830 Reviewed-By: Chengzhong Wu <legendecas@gmail.com> -------------------------------------------------------------------------------- βΉ This PR was created on Sun, 19 Apr 2026 10:37:36 GMT β Approvals: 1 β - Chengzhong Wu (@legendecas) (TSC): https://github.com/nodejs/node/pull/62830#pullrequestreview-4175823264 β semver-major requires at least 2 TSC approvals β Last GitHub CI successful βΉ Last Full PR CI on 2026-04-25T16:24:18Z: https://ci.nodejs.org/job/node-test-pull-request/72922/ - Querying data for job/node-test-pull-request/72922/ β Build data downloaded β Last Jenkins CI successful -------------------------------------------------------------------------------- β Aborted `git node land` session in /home/runner/work/node/node/.ncuhttps://github.com/nodejs/node/actions/runs/26103949075 |
|
Given that this is a breaking change, this needs another @nodejs/tsc review, thanks! |
Commit Queue failed- Loading data for nodejs/node/pull/62830 β Done loading data for nodejs/node/pull/62830 ----------------------------------- PR info ------------------------------------ Title lib: use Object.freeze to avoid defensive cloning in SourceMap (#62830) Author Daijiro Wachi <daijiro.wachi@gmail.com> (@watilde) Branch watilde:fixes-memory-sourcemap -> nodejs:main Labels semver-major, author ready, source maps, commit-queue-squash Commits 4 - lib: use Object.freeze to avoid defensive cloning in SourceMap - doc: clarify sourceMap.payload behavior and immutability - doc: add change metadata for validator message - doc: fix unclosed YAML comment in sourceMap.payload Committers 2 - Daijiro Wachi <daijiro.wachi@gmail.com> - GitHub <noreply@github.com> PR-URL: https://github.com/nodejs/node/pull/62830 Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/62830 Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> -------------------------------------------------------------------------------- βΉ This PR was created on Sun, 19 Apr 2026 10:37:36 GMT β Approvals: 2 β - Chengzhong Wu (@legendecas) (TSC): https://github.com/nodejs/node/pull/62830#pullrequestreview-4175823264 β - Yagiz Nizipli (@anonrig) (TSC): https://github.com/nodejs/node/pull/62830#pullrequestreview-4320305018 β Last GitHub CI successful βΉ Last Full PR CI on 2026-05-19T14:32:59Z: https://ci.nodejs.org/job/node-test-pull-request/72922/ - Querying data for job/node-test-pull-request/72922/ β Build data downloaded β Last Jenkins CI successful -------------------------------------------------------------------------------- β No git cherry-pick in progress β No git am in progress β No git rebase in progress -------------------------------------------------------------------------------- - Bringing origin/main up to date... From https://github.com/nodejs/node * branch main -> FETCH_HEAD β origin/main is now up-to-date - Downloading patch for 62830 From https://github.com/nodejs/node * branch refs/pull/62830/merge -> FETCH_HEAD β Fetched commits as 783b38248310..673e0a2285e9 -------------------------------------------------------------------------------- [main 69cf5e6625] lib: use Object.freeze to avoid defensive cloning in SourceMap Author: Daijiro Wachi <daijiro.wachi@gmail.com> Date: Sun Apr 19 19:40:37 2026 +0900 2 files changed, 19 insertions(+), 8 deletions(-) Auto-merging doc/api/module.md [main 9ca29e4b19] doc: clarify sourceMap.payload behavior and immutability Author: Daijiro Wachi <daijiro.wachi@gmail.com> Date: Thu Apr 23 19:36:22 2026 +0900 1 file changed, 4 insertions(+) Auto-merging doc/api/module.md [main 7b0a139518] doc: add change metadata for validator message Author: Daijiro Wachi <daijiro.wachi@gmail.com> Date: Fri Apr 24 02:52:24 2026 +0900 1 file changed, 5 insertions(+) Auto-merging doc/api/module.md [main 4251de19a1] doc: fix unclosed YAML comment in sourceMap.payload Author: Daijiro Wachi <daijiro.wachi@gmail.com> Date: Sat Apr 25 18:32:39 2026 +0900 1 file changed, 2 insertions(+) β Patches applied There are 4 commits in the PR. Attempting to fixup everything into first commit. [main 1bd0ca9117] lib: use Object.freeze to avoid defensive cloning in SourceMap Author: Daijiro Wachi <daijiro.wachi@gmail.com> Date: Sun Apr 19 19:40:37 2026 +0900 3 files changed, 30 insertions(+), 8 deletions(-) --------------------------------- New Message ---------------------------------- lib: use Object.freeze to avoid defensive cloning in SourceMaphttps://github.com/nodejs/node/actions/runs/26114797253 |
|
Landed in b1387e6 |
No description provided.